<#assign module="driver"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
<link rel="stylesheet" href="${ctx}/assets/css/bootstrap-switch.min.css">
<link rel="stylesheet" href="${ctx}/assets/css/jquery.Jcrop.css">
<style>
	/* autocomplete */
	div.ac {border: 1px solid #ccc;position: absolute;display: none;overflow: auto;background-color: #ffffff;z-index:998;}
	div.ac > ul {margin-top:10px;padding:0;}
	div.ac > ul > li {height:33px;line-height:33px;cursor:pointer;}
	div.ac > ul > li:hover{background:#eee;}
	div.ac > ul > li > div span {padding-left:15px;}
	div.ac > ul > li > div span em {color:red;font-style: normal;}
</style>
</@override>
<@override name="body">
	<div class="row">
		
		<div class="col-md-12">
		
			<div class="tabbable"> <!-- Only required for left/right tabs -->
				<ul class="nav nav-tabs">
				    <li class="active"><a href="#basicInfo" data-toggle="tab">基本信息</a></li>
				    <li><a href="#detailedInfoTab" data-toggle="tab">详细信息</a></li>
				    <@daijia>
				    <li style="display:none;" id="daijiaTabLi"><a href="#daijiaTab" data-toggle="tab">代驾</a></li>
				    </@daijia>
				    <@zhuan>
				    <li style="display:none;" id="zhuancheTabLi"><a href="#zhuancheTab" data-toggle="tab">专车</a></li>
				    </@zhuan>
				    <@pao>
				    <li style="display:none;" id="errandTabLi"><a href="#errandTab" data-toggle="tab">跑腿</a></li>
				    </@pao>
				    <@freight>
				    <li style="display:none;" id="freightTabLi"><a href="#freightTab" data-togglshow_travele="tab">货运</a></li>
				    </@freight>
				    <@zhuanxian>
				    <li style="display:none;" id="zhuanxianTabLi"><a href="#zhuanxianTab" data-toggle="tab">快车</a></li>
				    </@zhuanxian>
				</ul>
				
				<form id="submit_form"  class="form-horizontal">
					<input type="hidden" id="photo" name="photo" value="${driver.photo?if_exists}">
					<input type="hidden" id="license" name="license" value="${driver.license?if_exists}">
					<input type="hidden" id="travel" name="travel" value="${driver.travel?if_exists}">
					<input type="hidden" id="bigPhoto" name="bigPhoto" value="${driver.bigPhoto?if_exists}">
					<input type="hidden" id="idCardPhoto" name="idCardPhoto" value="${driver.idCardPhoto?if_exists}">
					<input type="hidden" id="idCardHandPhoto" name="idCardHandPhoto" value="${driver.idCardHandPhoto?if_exists}">
					<input type="hidden" id="carId" name="carId"  />
					<input type="hidden" id="truckId" name="truckId"  />
					<input type="hidden" id="zhuanxianCarId" name="zhuanxianCarId"  />
					<div class="tab-content">
			    		<div class="tab-pane in active" id="basicInfo">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="form-group">
										<div class="col-sm-8">
											<div style="float:left;width:200;margin-right:8px;">
										  		<p>服务人员头像</p>
										    	<div id="show_photo_div">
										      		<img id="show_photo" width="200" height="200" <#if driver.photo?? && (driver.photo?length>0)>src="${ctx}/upload/driver/${driver.photo}"</#if>/>
										    	</div>
										    	<p></p>
										    	<p>
											  		<button type="button" href="javascript:;" class="btn btn-primary" id="photo_upload_dialog">上传头像</button>
										    	</p>
											</div>
											<div style="float:left;width:317;">
											  	<p>服务人员身份证</p>
											  	<div id="show_idCardPhoto_div">
											  		<img id="show_idCardPhoto" width="317" height="200" <#if driver.idCardPhoto??>src="${ctx}/upload/idCardPhoto/${driver.idCardPhoto}"</#if>/>
											  	</div>
											  	<p></p>
										        <p>
											        <button type="button" href="javascript:;" class="btn btn-primary" id="idCardPhoto_upload_dialog">上传身份证照</button>
										        </p>
											</div>
											<div style="float:left;width:317;margin-left:8px">
											  	<p>服务人员手持身份证</p>
											  	<div id="show_idCardPhotoHand_div">
											  		<img id="show_idCardHandPhoto" width="317" height="200" <#if driver.idCardHandPhoto??>src="${ctx}/upload/idCardHandPhoto/${driver.idCardHandPhoto}"</#if>/>
											  	</div>
											  	<p></p>
										        <p>
											        <button type="button" href="javascript:;" class="btn btn-primary" id="idCardHandPhoto_upload_dialog">上传手持身份证照片</button>
										        </p>
											</div>
										</div>
									</div>
									
									<div class="form-group">
					                    <label for="username" class="col-sm-1 control-label"><em>*</em>工号：</label>
					                    <div class="col-sm-4">
					                   		<input class="form-control" id="username" name="username" type="text" value="${newUsername?if_exists}" pattern=".{2,}" required  readonly>
<#--					                    	<span class="help-block">请输入服务人员端登录工号</span>-->
					                    </div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="name" class="col-sm-1 control-label"><em>*</em>昵称：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="name" name="name" type="text" value="${driver.name?if_exists}" required placeholder="填写服务人员昵称，用于APP显示"/>
					               		</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="name" class="col-sm-1 control-label"><em>*</em>真实姓名：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="realname" name="realname" type="text" value="${driver.realname?if_exists}" required placeholder="填写服务人员真实姓名"/>
					                	</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="idCard" class="col-sm-1 control-label"><em>*</em>身份证号：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="idCard" name="idCard" type="text" value="${driver.idCard?if_exists}" required placeholder="填写服务人员身份证号"/>
					                	</div>
					                </div>
					                
					                 <div class="form-group">
					                    <label for="bankCard" class="col-sm-1 control-label"><em>*</em>绑定支付账号：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="bankCard" name="bankCard" type="text" value="${driver.bankCard?if_exists}" required placeholder="填写绑定服务人员支付账号"/>
					                	</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="gender" class="col-sm-1 control-label"><em>*</em>性别：</label>
					                    <div class="col-sm-4">
						                    <div class="checkbox">
						                    	<label>
												  <input type="radio" name="gender" value="男" <#if driver.gender??><#if driver.gender=='男'>checked="checked"</#if><#else>checked="checked"</#if> />男
												</label>
												<label>
												  <input type="radio" name="gender" value="女" <#if driver.gender?? && driver.gender=='女'>checked="checked"</#if> />女
												</label>
											</div>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="phone" class="col-sm-1 control-label"><em>*</em>手机号：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="phone" name="phone" type="text" value="${driver.phone?if_exists}" required placeholder="填写服务人员手机号"/>
					                	</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="phone" class="col-sm-1 control-label"><em>*</em>紧急联系人：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="emergency" name="emergency" type="text" value="${driver.emergency?if_exists}" required placeholder="姓名+电话+关系"/>
					                	</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="licenseTime" class="col-sm-1 control-label"><em>*</em>领证时间：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="licenseTime" name="licenseTime" type="text" <#if driver.licenseTime??>value="${driver.licenseTime?string('yyyy-MM-dd')}"</#if> required readonly/>
					                	</div>
									</div>
					                
					                <div class="form-group">
					                    <label for="type" class="col-sm-1 control-label"><em>*</em>员工类型：</label>
					                    <div class="col-sm-4">
				                    		<select class="form-control" id="type" name="type" required> 
				                    			<option value="兼职" <#if driver.type?? && driver.type=='兼职'>selected="selected"</#if>>兼职</option>
				                    			<option value="全职" <#if driver.type?? && driver.type=='全职'>selected="selected"</#if>>全职</option>
				                    		</select>
				                    		<span class="help-block"><em>全职不提成</em></span>
				                    	</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="type" class="col-sm-1 control-label"><em>*</em>服务类型：</label>
					                    <div class="col-sm-11">
					                    	<div class="checkbox">
						                	<input type="hidden" name ="detailedJobType" id="detailedJobType"/>
					                    		<@daijia>
						                    	<label>
												  <input type="checkbox" name="driverJobType" value="daijia" />代驾
												</label>
												</@daijia>
												<@zhuan>
												<label>
												  <input type="checkbox" name="driverJobType" value="zhuanche" />专车
												</label>
												</@zhuan>
												<@pao>
												<label>
												  <input type="checkbox" name="driverJobType" value="paotui" />跑腿
												</label>
												</@pao>
												<@freight>
												<label>
												  <input type="checkbox" name="driverJobType" value="freight" />货运
												</label>
												</@freight>
												<@zhuanxian>
												<label>
												  <input type="checkbox" name="driverJobType" value="zhuanxian" />快车
												</label>
												</@zhuanxian>
											</div>
										</div>
					                </div>
					                <div id="paotuichild" class="form-group" style="display:none;">
					                    <label for="type" class="col-sm-1 control-label"><em>*</em>跑腿子类型：</label>
					                    <div class="col-sm-11">
					                    	<div class="checkbox">
						                		<#if (detailedJobType?? && detailedJobType?size>0)>
								                	<#list detailedJobType as JobType>
								                	  <label>
								                    	<input type="checkbox" name="JobType" value="${JobType.id}"/>${JobType.typeName}
								                      </label>	
								                	</#list> 
						                		</#if>
						                	</div>
						                </div>
						             </div>
								</div>
							</div>
						</div>
						<div class="tab-pane in" id="detailedInfoTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="form-group">
										<div class="col-sm-12">
											<div style="float:left;width:550;margin-right:8px;">
											  	<p>服务人员驾驶证</p>
											  	<div id="show_license_div">
											  		<img id="show_license" width="550" height="200" <#if driver.license??>src="${ctx}/upload/license/${driver.license}"</#if>/>
											  	</div>
											  	<p></p>
										        <p>
											        <button type="button" href="javascript:;" class="btn btn-primary" id="license_upload_dialog">上传驾驶证</button>
										        </p>
										  	</div>
										  	<div style="float:left;width:550;margin-right:8px;">
											  	<p>服务人员行驶证</p>
											  	<div id="show_travel_div">
											  		<img id="show_travel" width="550" height="200" <#if driver.travel??>src="${ctx}/upload/travel/${driver.travel}"</#if>/>
											  	</div>
											  	<p></p>
										        <p>
											        <button type="button" href="javascript:;" class="btn btn-primary" id="travel_upload_dialog">上传行驶证</button>
										        </p>
										  	</div>
											<div style="float:left;width:550;margin-right:8px;">
												<p>网约车资格证</p>
												<div id="show_qualificationPhoto_div">
													<img id="show_qualificationPhoto" width="550" height="200" <#if driver.qualificationPhoto??>src="${ctx}/upload/qualificationPhoto/${driver.qualificationPhoto}"</#if>/>
												</div>
												<p></p>
												<p>
													<button type="button" href="javascript:;" class="btn btn-primary" id="qualification_upload_dialog">上传资格证</button>
												</p>
											</div>
										  	<div style="float:left;width:200;margin-right:8px;">
											  	<p>服务人员全身照</p>
											  	<div id="show_bigPhoto_div">
											  		<img id="show_bigPhoto" width="125" height="200" <#if driver.bigPhoto??>src="${ctx}/upload/driverbigphoto/${driver.bigPhoto}"</#if>/>
											  	</div>
											  	<p></p>
										        <p>
											        <button type="button" href="javascript:;" class="btn btn-primary" id="bigPhoto_upload_dialog">上传全身照</button>
										        </p>
										  	</div>
								  		</div>
								  	</div>
					                <@zhuanxian>
				    				<@shiro.hasPermission name='drivergrade'>
					                <div class="form-group">
			                    		<label for="gradeId"  class="col-sm-2 control-label">服务人员等级：</label>
					                    <div class="col-sm-4">
				                    		<select class="form-control" id="gradeId" name="gradeId"> 
				                    			<option value="">--请选择等级--<optin>
					                    		<#if (driverGrades?? && driverGrades?size>0)>
								                	<#list driverGrades as dg>
								                    	<option value="${dg.id}" <#if driver.gradeId?? && driver.gradeId==dg.id>selected="selected"</#if>>${dg.name}</option>
								                	</#list>
						                		</#if>
				                    		</select>
				                    	</div>
			               			</div>
			               			</@shiro.hasPermission>
				    				</@zhuanxian>
						            <div class="form-group">
					                    <label for="pressingPhone" class="col-sm-2 control-label">服务次数：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="driveTimes" name="driveTimes" type="number" min="0" value="${driver.driveTimes?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
				                    	<label for="pressingPhone"  class="col-sm-2 control-label">服务人员评分：</label>
										<div class="col-sm-4">
				                    		<input class="form-control" id="starLevel" name="starLevel" type="text" min="1" max="5" value="${driver.starLevel?if_exists}" placeholder="服务人员评分为1-5分"/>
				                		</div>
									</div>
				                
					                
					                <div class="form-group">
					                    <label for="pressingPhone"  class="col-sm-2 control-label">驾照类型：</label>
					                    <div class="col-sm-4">
					                    	<select class="form-control licenseType_class" id="licenseType_select"></select>
		                                    <input type="hidden" id="licenseType" name="licenseType" value="${driver.licenseType?if_exists}">
		                                    <input type="hidden" id="licenseTypeName" name="licenseTypeName" value="${driver.licenseTypeName?if_exists}">
										</div>
				                    </div>
					                
					                <div class="form-group">
					                    <label for="pressingPhone" class="col-sm-2 control-label">介绍人：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="introducer" name="introducer" type="text" value="${driver.introducer?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="pressingPhone" class="col-sm-2 control-label">身高(cm)：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="height" name="height" type="number" value="${driver.height?if_exists}" min="0"/>
										</div>
					                </div>
					                <div class="form-group">
				                    	<label for="idCard"  class="col-sm-2 control-label">户口登记机关：</label>
				                    	<div class="col-sm-4">
				                	    	<input class="form-control" id="driverCensus" name="driverCensus" type="text" value="${driver.driverCensus?if_exists}" />
				                		</div>
				                    </div>
					                <div class="form-group">
					                    <label for="pressingPhone" class="col-sm-2 control-label">籍贯：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="origin" name="origin" type="text" value="${driver.origin?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="address" class="col-sm-2 control-label">家庭住址：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="address" name="address" type="text" value="${driver.address?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="pressingName" class="col-sm-2 control-label">紧急联系人：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="pressingName" name="pressingName" type="text" value="${driver.pressingName?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="pressingPhone" class="col-sm-2 control-label">紧急电话：</label>
					                    <div class="col-sm-4">
					                    	<input class="form-control" id="pressingPhone" name="pressingPhone" type="text" value="${driver.pressingPhone?if_exists}"/>
										</div>
					                </div>
					                
					                <div class="form-group">
					                    <label for="memo" class="col-sm-2 control-label">备注：</label>
										<div class="col-sm-4">
					                    	<textarea class="form-control" cols="20" id="memo" name="memo" rows="2">${driver.memo?if_exists}</textarea>
										</div>
					                </div>
								</div>
							</div>
						</div>
						<@daijia>
						<div class="tab-pane in" id="daijiaTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="col-sm-4" id="daijia_div">
										<h4>代驾提成</h4><hr/>
										<#list companys?sort_by("sort")?reverse as company>
						                	<div class="form-group">
						                		<input type="hidden" name="driverChoseLevels[${company_index}].companyId" value="${company.id}">
												<label for="type"><em>*</em>接${company.abbreviation?if_exists}的订单提成方式<#if companyId==company.id><em>(当前登录用户所在公司)</em></#if>：</label>
						                    	<select class="form-control" name="driverChoseLevels[${company_index}].driverlevelId"> 
						                    		<#if companyId!=company.id>
														<option value="0">始终使用服务人员所在公司提成</option>
													</#if>
						                    		<option value="">不提成</option>
						                    		<#list company.driverLevels as driverlevel>
						                    			<option value="${driverlevel.id}">${driverlevel.name}</option>
						                    		</#list>
						                    	</select>
							                </div>
						                </#list>
									</div>
								</div>
							</div>
						</div>
						</@daijia>
						<@zhuan>
						<div class="tab-pane in" id="zhuancheTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="col-sm-7">
										<h4>专车服务人员信息</h4><hr/>
										<div class="form-group">
						                    <label for="carNumber" class="col-sm-3 control-label">平台的注册地行政区划代码：</label>
						                    <div class="col-sm-3">
	                                        	<select class="form-control addressCode_class" id="addressCode_select">
	                                            </select>
	                                        	<input type="hidden" id="addressCode" name="addressCode" value="${driver.addressCode?if_exists}">
	                                        	<input type="hidden" id="addressCodeArr" name="addressCodeArr" value="${driver.addressCodeArr?if_exists}">
                                        	</div>
						                </div>
						                <div class="form-group">
						                    <label for="carNumber" class="col-sm-3 control-label">车辆车牌：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="carNumber" name="carNumber" type="text" placeholder="请输入车牌号"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="driverLicenseNo" class="col-sm-3 control-label">机动车驾驶证号：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="driverLicenseNo" name="driverLicenseNo" type="text" placeholder="请输入机动车驾驶证号"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="driverLicenseId" class="col-sm-3 control-label">机动车驾档编号：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="driverLicenseId" name="driverLicenseId" type="text" value="${driver.driverLicenseId?if_exists}" placeholder="请输入机动车驾档编号"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="nationality" class="col-sm-3 control-label">国籍：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="nationality" name="nationality" type="text" placeholder="请输入国籍"/>
											</div>
						                </div>
						                
						                <div class="form-group">
						                    <label for="nation" class="col-sm-3 control-label">驾驶员民族：</label>
						                    <div class="col-sm-5">
												<select class="form-control nation_class" id="nation_select"></select>
                                        		<input type="hidden" id="nation" name="nation" value="${driver.nation?if_exists}">
                                        		<input type="hidden" id="nationName" name="nationName" value="${driver.nationName?if_exists}">
											</div>
						                </div>
						                
						                <div class="form-group">
						                    <label for="birthday" class="col-sm-3 control-label">出生日期：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="birthday" name="birthday" type="text" placeholder="请输入出生日期" readonly/>
											</div>
						                </div>
						                
						                <div class="form-group">
						                    <label for="marital" class="col-sm-3 control-label">驾驶员婚姻状况：</label>
						                    <div class="col-sm-5">
						                    	<select id="marital" name="marital"  class="form-control">
									        		<option value="0" <#if driver.marital?? && driver.marital==0>selected="selected"</#if>>未婚</option>
									        		<option value="1" <#if driver.marital?? && driver.marital==1>selected="selected"</#if>>已婚</option>
									        		<option value="2" <#if driver.marital?? && driver.marital==2>selected="selected"</#if>>离异</option>
									        		<option value="3" <#if driver.marital?? && driver.marital==3>selected="selected"</#if>>丧偶</option>
									        	</select>
											</div>
						                </div>
						                
						                <div class="form-group">
						                    <label for="education" class="col-sm-3 control-label">驾驶员学历：</label>
						                    <div class="col-sm-5">
												<select class="form-control education_class" id="education_select"></select>
                                        		<input type="hidden" id="education" name="education" value="${driver.education?if_exists}">
                                        		<input type="hidden" id="educationName" name="educationName" value="${driver.educationName?if_exists}">
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="foreignLanguageAbility" class="col-sm-3 control-label">驾驶员外语能力：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="foreignLanguageAbility" name="foreignLanguageAbility" type="text" value="${driver.foreignLanguageAbility?if_exists}" placeholder="请输入驾驶员外语能力"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="concatAddress" class="col-sm-3 control-label">驾驶员驾驶员通信地址：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="concatAddress" name="concatAddress" type="text" value="${driver.concatAddress?if_exists}" placeholder="请输入驾驶员驾驶员通信地址"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="trafficViolation" class="col-sm-3 control-label">交通违章次数：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="trafficViolation" name="trafficViolation" type="number" value="${driver.trafficViolation?if_exists}" placeholder="请输入交通违章次数"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="driverLicenseValid" class="col-sm-3 control-label">驾驶证有效期起始时间：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="driverLicenseValid" name="driverLicenseValid" type="text" placeholder="请输入驾驶证有效期起始时间" <#if driver.driverLicenseValid??>value="${driver.driverLicenseValid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="driverLicenseInvalid" class="col-sm-3 control-label">驾驶证有效期限结束时间：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="driverLicenseInvalid" name="driverLicenseInvalid" type="text" placeholder="请输入驾驶证有效期限结束时间" <#if driver.driverLicenseInvalid??>value="${driver.driverLicenseInvalid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseNo" class="col-sm-3 control-label">网络预约出租车驾驶员证编号：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseNo" name="taxiLicenseNo" type="text" value="${driver.taxiLicenseNo?if_exists}" placeholder="请输入网络预约出租车驾驶员证编号"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseOrg" class="col-sm-3 control-label">资格证发证机构：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseOrg" name="taxiLicenseOrg" type="text" value="${driver.taxiLicenseOrg?if_exists}" placeholder="请输入网络预约出租汽车驾驶员证发证机构" />
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseRegister" class="col-sm-3 control-label">资格证发证日期：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseRegister" name="taxiLicenseRegister" type="text" placeholder="请输入资格证发证日期" <#if driver.taxiLicenseRegister??>value="${driver.taxiLicenseRegister?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						               <div class="form-group">
						                    <label for="taxiLicenseRecive" class="col-sm-3 control-label">初次领取资格证日期：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseRecive" name="taxiLicenseRecive" type="text" placeholder="请输入初次领取资格证日期" <#if driver.taxiLicenseRecive??>value="${driver.taxiLicenseRecive?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseInvalid" class="col-sm-3 control-label">资格证有效起始日期：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseValid" name="taxiLicenseValid" type="text" placeholder="请输入资格证有效起始日期" <#if driver.taxiLicenseValid??>value="${driver.taxiLicenseValid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseInvalid" class="col-sm-3 control-label">资格证有效截止日期：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="taxiLicenseInvalid" name="taxiLicenseInvalid" type="text" placeholder="请输入资格证有效截止日期" <#if driver.taxiLicenseInvalid??>value="${driver.taxiLicenseInvalid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="taxiLicenseOrg" class="col-sm-3 control-label">合同（或协议）签署公司：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="contractCompany" name="contractCompany" type="text" value="${driver.contractCompany?if_exists}" placeholder="请输入合同（或协议）签署公司" />
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="contractValid" class="col-sm-3 control-label">合同有效期起始时间：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="contractValid" name="contractValid" type="text" placeholder="请输入合同有效期起起始时间" <#if driver.contractValid??>value="${driver.contractValid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="contractInvalid" class="col-sm-3 control-label">合同有效期结束时间：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="contractInvalid" name="contractInvalid" type="text" placeholder="请输入合同有效期结束时间" <#if driver.contractInvalid??>value="${driver.contractInvalid?string('yyyy-MM-dd')}"</#if> readonly/>
											</div>
						                </div>
					                	<div class="form-group">
						                    <label for="cruise" class="col-sm-3 control-label">是否巡游出租汽车驾驶员：</label>
						                    <div class="col-sm-5">
												<select id="cruise" name="cruise"  class="form-control">
									        		<option value="0" <#if driver.cruise?? && driver.cruise==0>selected="selected"</#if>>否</option>
									        		<option value="1" <#if driver.cruise?? && driver.cruise==1>selected="selected"</#if>>是</option>
									        	</select>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="inBlacklist" class="col-sm-3 control-label">是否在黑名单内：</label>
						                    <div class="col-sm-5">
												<select id="inBlacklist" name="inBlacklist"  class="form-control">
									        		<option value="0" <#if driver.inBlacklist?? && driver.inBlacklist?string("true","false")=="false">selected="selected"</#if>>否</option>
									        		<option value="1" <#if driver.inBlacklist?? && driver.inBlacklist?string("true","false")=="true">selected="selected"</#if>>是</option>
									        	</select>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="phoneOperator" class="col-sm-3 control-label">服务人员运营商：</label>
						                    <div class="col-sm-5">
						                    	<select id="phoneOperator" name="phoneOperator"  class="form-control">
									        		<option value="CHINA_UNICOM" <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_UNICOM">selected="selected"</#if>>中国联通</option>
									        		<option value="CHINA_MOBILE" <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_MOBILE">selected="selected"</#if>>中国移动</option>
									        		<option value="CHINA_TELCOM" <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_TELCOM">selected="selected"</#if>>中国电信</option>
									        		<option value="QT" <#if driver.phoneOperator?? && driver.phoneOperator=="QT">selected="selected"</#if>>其他</option>
									        	</select>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="mapType" class="col-sm-3 control-label">使用地图类型：</label>
						                    <div class="col-sm-5">
						                    	<select id="mapType" name="mapType"  class="form-control">
									        		<option value="0" <#if driver.mapType?? && driver.mapType=="0">selected="selected"</#if>>百度地图</option>
									        		<option value="1" <#if driver.mapType?? && driver.mapType=="1">selected="selected"</#if>>谷歌地图</option>
									        		<option value="2" <#if driver.mapType?? && driver.mapType=="2">selected="selected"</#if>>高德地图</option>
									        		<option value="3" <#if driver.mapType?? && driver.mapType=="3">selected="selected"</#if>>腾讯地图</option>
									        	</select>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="mapType" class="col-sm-3 control-label">服务类型：</label>
						                    <div class="col-sm-5">
						                    	<select id="commercialType" name="commercialType"  class="form-control">
									        		<option value="1" <#if driver.commercialType?? && driver.commercialType=="1">selected="selected"</#if>>网络预约出租车</option>
									        		<option value="2" <#if driver.commercialType?? && driver.commercialType=="2">selected="selected"</#if>>巡游出租车</option>
									        		<option value="3" <#if driver.commercialType?? && driver.commercialType=="3">selected="selected"</#if>>私人小客车合乘</option>
									        	</select>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="emergencyAddress" class="col-sm-3 control-label">紧急情况联系人通信地址：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="emergencyAddress" name="emergencyAddress" type="text" value="${driver.emergencyAddress?if_exists}" placeholder="请输入紧急情况联系人通信地址"/>
											</div>
						                </div>
						                <div class="form-group">
						                    <label for="seviceReview" class="col-sm-3 control-label">驾驶员服务质量信誉考核结果：</label>
						                    <div class="col-sm-5">
												<input class="form-control" id="seviceReview" name="seviceReview" type="number" value="${driver.seviceReview?if_exists}" placeholder="请输入驾驶员服务质量信誉考核结果"/>
											</div>
						                </div>
									</div>
									<div class="col-sm-5" id="zhuanche_div">
										<h4>专车提成</h4><hr/>
										<#list companys?sort_by("sort")?reverse as company>
						                	<div class="form-group">
						                		<input type="hidden" name="driverChoseLevelCars[${company_index}].companyId" value="${company.id}">
												<label for="type"><em>*</em>接${company.abbreviation?if_exists}的订单提成方式<#if companyId==company.id><em>(当前登录用户所在公司)</em></#if>：</label>
						                    	<select class="form-control" name="driverChoseLevelCars[${company_index}].driverlevelId"> 
						                    		<#if companyId!=company.id>
														<option value="0">始终使用服务人员所在公司提成</option>
													</#if>
						                    		<option value="">不提成</option>
						                    		<#list company.driverLevels as driverlevel>
						                    			<option value="${driverlevel.id}">${driverlevel.name}</option>
						                    		</#list>
						                    	</select>
							                </div>
						                </#list>
									</div>
								</div>
							</div>
						</div>
						</@zhuan>
						<@pao>
						<div class="tab-pane in" id="errandTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="col-sm-4" id="paotui_div">
										<h4>跑腿提成</h4><hr/>
										<#list companys?sort_by("sort")?reverse as company>
						                	<div class="form-group">
						                		<input type="hidden" name="driverChoseLevelPaotuis[${company_index}].companyId" value="${company.id}">
												<label for="type"><em>*</em>接${company.abbreviation?if_exists}的订单提成方式<#if companyId==company.id><em>(当前登录用户所在公司)</em></#if>：</label>
						                    	<select class="form-control" name="driverChoseLevelPaotuis[${company_index}].driverlevelId"> 
						                    		<#if companyId!=company.id>
														<option value="0">始终使用服务人员所在公司提成</option>
													</#if>
						                    		<option value="">不提成</option>
						                    		<#list company.driverLevels as driverlevel>
						                    			<option value="${driverlevel.id}">${driverlevel.name}</option>
						                    		</#list>
						                    	</select>
							                </div>
						                </#list>
									</div>
								</div>
							</div>
						</div>
						</@pao>
						<@freight>
						<div class="tab-pane in" id="freightTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="col-sm-7">
										<h4>货运服务人员信息</h4><hr/>
										<div class="form-group">
						                    <label for="truckNumber" class="col-sm-2 control-label">(货运)货车车牌：</label>
						                    <div class="col-sm-4">
												<input class="form-control" id="truckNumber" name="truckNumber" type="text" placeholder="请输入车牌号"/>
											</div>
						                </div>
									</div>
									<div class="col-sm-5" id="freight_div">
										<h4>货运提成</h4><hr/>
										<#list companys?sort_by("sort")?reverse as company>
						                	<div class="form-group">
						                		<input type="hidden" name="driverChoseLevelFreights[${company_index}].companyId" value="${company.id}">
												<label for="type"><em>*</em>接${company.abbreviation?if_exists}的订单提成方式<#if companyId==company.id><em>(当前登录用户所在公司)</em></#if>：</label>
						                    	<select class="form-control" name="driverChoseLevelFreights[${company_index}].driverlevelId"> 
						                    		<#if companyId!=company.id>
														<option value="0">始终使用服务人员所在公司提成</option>
													</#if>
						                    		<option value="">不提成</option>
						                    		<#list company.driverLevels as driverlevel>
						                    			<option value="${driverlevel.id}">${driverlevel.name}</option>
						                    		</#list>
						                    	</select>
							                </div>
						                </#list>
									</div>
								</div>
							</div>
						</div>
						</@freight>
						<@zhuanxian>
						<div class="tab-pane in" id="zhuanxianTab">
			    			<div class="panel margin-top">
								<div class="panel-body">
									<div class="col-sm-7">
										<h4>快车服务人员信息</h4><hr/>
										<div class="form-group">
						                    <label for="zhuanxianNumber" class="col-sm-2 control-label">(快车)车辆车牌：</label>
						                    <div class="col-sm-4">
												<input class="form-control" id="zhuanxianNumber" name="zhuanxianNumber" type="text"  placeholder="请输入车牌号"/>
											</div>
						                </div>
									</div>
									<div class="col-sm-5" id="zhuanxian_div">
										<h4>快车提成</h4><hr/>
										<div id="zhuanxian_line_div">
											请先选择货运车辆或该车辆未选择路线
										</div>
									</div>
								</div>
							</div>
						</div>
						</@zhuanxian>
					</div>
					
					<div class="col-md-12">
						<div class="col-sm-offset-4 col-md-2">
				   			<input id="submit_button" type="button" class="btn btn-primary btn-block" value="保存">
						</div>
						<div class="col-md-2">
				   			<input type="button" class="btn btn-default btn-block" onclick="window.location.href = '${ctx}/driver/list';" value="返回">
						</div>
					</div>
		
				</form>
			</div>
			
		</div>
		
		
	
	</div>
		
	
	<div id="level_div" style="display:none;">
		<#list companys?sort_by("sort")?reverse as company>
			<#if company.id==companyId>
				<#list company.driverLevels as driverlevel>
        			<option value="${driverlevel.id}">${driverlevel.name}</option>
        		</#list>
			</#if>
        </#list>
	</div>
	
	<div id="dialog_local_photo" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员头像上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-8">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="photolocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="photoFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
						        <button style="display:none;" href="javascript:;" class="btn btn-primary" id="photoSnap">拍照上传</button>
					        </p>
					    </div>
			            <div style="width:400px;height:400px;overflow:hidden;display:none;">
					    	<video id="photoVideo" width="400" height="400" autoplay></video>
					    </div>
					    <canvas id="photoCanvas" width="400" height="400" style="display:none;"></canvas>
					    <div id="photoImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-4">
		        	<div id="photoImg_container" style="width:200px;height:200px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="photo_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>
	
	<div id="dialog_local_license" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员驾驶证上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-6">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="licenselocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="licenseFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
						        <button style="display:none;" href="javascript:;" class="btn btn-primary" id="licenseSnap">拍照上传</button>
					        </p>
					    </div>
			            <div style="width:400px;height:400px;overflow:hidden;display:none;">
					    	<video id="licenseVideo" width="400" height="400" autoplay></video>
					    </div>
					    <canvas id="licenseCanvas" width="400" height="400" style="display:none;"></canvas>
					    <div id="licenseImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-6">
		        	<div id="licenseImg_container" style="width:412px;height:150px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="license_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>
	
	<div id="dialog_local_travel" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员行驶证上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-6">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="travellocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="travelFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
						        <button style="display:none;" href="javascript:;" class="btn btn-primary" id="travelSnap">拍照上传</button>
					        </p>
					    </div>
			            <div style="width:400px;height:400px;overflow:hidden;display:none;">
					    	<video id="travelVideo" width="400" height="400" autoplay></video>
					    </div>
					    <canvas id="travelCanvas" width="400" height="400" style="display:none;"></canvas>
					    <div id="travelImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-6">
		        	<div id="travelImg_container" style="width:412px;height:150px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="travel_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>

	<div id="dialog_local_qualification" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">资格证上传</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-xs-6">
							<div class="form-group">
								<div class="caption" style="height:40px;">
									<p>
										<button href="javascript:;" class="btn btn-primary" id="travellocalsnap">本地上传</button>
										<input style="display:none;" type="file" name="pic1" id="travelFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
										<button style="display:none;" href="javascript:;" class="btn btn-primary" id="travelSnap">拍照上传</button>
									</p>
								</div>
								<div style="width:400px;height:400px;overflow:hidden;display:none;">
									<video id="travelVideo" width="400" height="400" autoplay></video>
								</div>
								<canvas id="travelCanvas" width="400" height="400" style="display:none;"></canvas>
								<div id="travelImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">

								</div>
							</div>
						</div>
						<div class="col-xs-6">
							<div id="travelImg_container" style="width:412px;height:150px;overflow:hidden;margin-top:40px;">

							</div>
						</div>
						<div class="col-xs-12">
							<div class="form-group">
								<div class="caption">
									<p>
										<button href="javascript:;" id="travel_ok" class="btn btn-primary">确认</button>
									</p>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
	
	<div id="dialog_local_bigPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员全身照上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-9">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="bigPhotolocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="bigPhotoFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
						        <button style="display:none;" href="javascript:;" class="btn btn-primary" id="bigPhotoSnap">拍照上传</button>
					        </p>
					    </div>
			            <div style="width:600px;height:600px;overflow:hidden;display:none;">
					    	<video id="bigPhotoVideo" width="600" height="600" autoplay></video>
					    </div>
					    <canvas id="bigPhotoCanvas" width="600" height="600" style="display:none;"></canvas>
					    <div id="bigPhotoImg_div" style="width:600px;height:600px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-3">
		        	<div id="bigPhotoImg_container" style="width:125px;height:200px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="bigPhoto_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>
	
	<div id="dialog_local_idCardPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员身份证上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-6">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="idCardPhotolocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="idCardPhotoFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
					        </p>
					    </div>
					    <div id="idCardPhotoImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-6">
		        	<div id="idCardPhotoImg_container" style="width:412px;height:150px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="idCardPhoto_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>

	<div id="dialog_local_idCardHandPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-lg">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title">服务人员手持身份证上传</h4>
	      </div>
	      <div class="modal-body">
	  		<div class="row">
				<div class="col-xs-6">
			      	<div class="form-group">
			      		<div class="caption" style="height:40px;">
					        <p>
						        <button href="javascript:;" class="btn btn-primary" id="idCardHandPhotolocalsnap">本地上传</button>
						        <input style="display:none;" type="file" name="pic1" id="idCardHandPhotoFile" accept=".bmp,.gif,.jpeg,.jpg,.png">
					        </p>
					    </div>
					    <div id="idCardHandPhotoImg_div" style="width:400px;height:400px;display:table-cell;text-align:center;">
					    	
					    </div>
			        </div>
		        </div>
		        <div class="col-xs-6">
		        	<div id="idCardHandPhotoImg_container" style="width:412px;height:150px;overflow:hidden;margin-top:40px;">
		        		
		        	</div>
		        </div>
		        <div class="col-xs-12">
			      	<div class="form-group">
			      		<div class="caption">
					        <p>
						        <button href="javascript:;" id="idCardHandPhoto_ok" class="btn btn-primary">确认</button>
					        </p>
					    </div>
			        </div>
		        </div>
		  	</div>
	       
	      </div>
	    </div>
	  </div>
	</div>
</@override>
<@override name="footer">
<script src="${ctx}/assets/js/bootstrap-switch.min.js"></script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/assets/js/ajaxfileupload.js"></script>
<script src="${ctx}/assets/js/idcardvalid.js"></script>
<script src="${ctx}/assets/js/district-all.js"></script>
<script src="${ctx}/assets/js/driver.js"></script>
<script src="${ctx}/assets/js/linkagesel.js"></script>
<script src="${ctx}/assets/js/selectData.js"></script>
<script src="${ctx}/assets/js/drivercamera.js"></script>
<script src="${ctx}/assets/js/swfobject.js"></script>
<script src="${ctx}/assets/js/jquery.Jcrop.js"></script>
<script src="${ctx}/assets/js/jquery.autocomplete.min.js"></script>

<script type="text/javascript">
<#if message??>
	$.scojs_message("${message}", $.scojs_message.TYPE_ERROR);
</#if>
window.daijia = {
	ctx:'${ctx}',
	userId:'<@shiro.principal property='id'/>'
};

$(document).ready(function(){
	if($("#birthday").length>0){
		$("#birthday").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate:new Date()});
	}
	if($("#driverLicenseValid").length>0){
		$("#driverLicenseValid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate: new Date()});
	}
	if($("#driverLicenseInvalid").length>0){
		$("#driverLicenseInvalid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#taxiLicenseRecive").length>0){
		$("#taxiLicenseRecive").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate: new Date()});
	}
	if($("#taxiLicenseRegister").length>0){
		$("#taxiLicenseRegister").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate: new Date()});
	}
	if($("#taxiLicenseValid").length>0){
		$("#taxiLicenseValid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate: new Date()});
	}
	if($("#taxiLicenseInvalid").length>0){
		$("#taxiLicenseInvalid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#contractValid").length>0){
		$("#contractValid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, endDate: new Date()});
	}
	if($("#contractInvalid").length>0){
		$("#contractInvalid").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#trainTime").length>0){
		$("#trainTime").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#beginTime").length>0){
		$("#beginTime").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#endTime").length>0){
		$("#endTime").datetimepicker({ format: 'yyyy-mm-dd', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#complaintTime").length>0){
		$("#complaintTime").datetimepicker({ format: 'yyyy-mm-dd hh:ii:ss', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}
	if($("#resultTime").length>0){
		$("#resultTime").datetimepicker({ format: 'yyyy-mm-dd hh:ii:ss', language: 'zh-CN', minView: 'month', pickDate: true, pickTime: false, inputMask: false, autoclose: true, startDate: new Date()});
	}


	//平台的注册地行政区划代码下拉框实现
	var cityopts = {
        data: districtData,     // districtData为district-all.js中定义的变量
        selClass: 'form-control addressCode_class',
        head: '--请选择--',
        selStyle: 'margin-top: 3px;',
        fixWidth: 150,
        defVal: [${driver.addressCodeArr?if_exists}],
        select:  '#addressCode_select'
    };
    var linkageSel = new LinkageSel(cityopts);
    linkageSel.onChange(function() {
    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
    	$("#addressCode").val(code);
    });
    
  //驾驶员民族,下拉框实现
	var nationopts = {
        data: nationData,     // nationData为selectData.js中定义的变量
        selClass: 'form-control nation_class',
        head: '--请选择--',
        selStyle: 'margin-top: 3px;',
        fixWidth: 150,
        defVal: getNationDataIndex($("#nation").val()),
        select:  '#nation_select'
    };
	
	var linkageSe3 = new LinkageSel(nationopts);
	 linkageSe3.onChange(function() {
    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
    	$("#nation").val(code);
    });
    
  //驾驶员学历,下拉框实现
	var educationopts = {
        data: educationData,     // educationData为selectData.js中定义的变量
        selClass: 'form-control education_class',
        head: '--请选择--',
        selStyle: 'margin-top: 3px;',
        fixWidth: 150,
        defVal: getEducationDataIndex($("#education").val()),
        select:  '#education_select'
    };
	
	var linkageSe4 = new LinkageSel(educationopts);
	 linkageSe4.onChange(function() {
    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
    	$("#education").val(code);
    });
    
  //驾驶员准驾车型,下拉框实现
	var licenseTypeopts = {
        data: driverTypeData,     // driverTypeData为selectData.js中定义的变量
        selClass: 'form-control licenseType_class',
        head: '--请选择--',
        selStyle: 'margin-top: 3px;',
        fixWidth: 150,
        defVal: getDriverTypeDataIndex($("#licenseType").val()),
        select:  '#licenseType_select'
    };
	
	var linkageSe5 = new LinkageSel(licenseTypeopts);
	 linkageSe5.onChange(function() {
    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
    	$("#licenseType").val(code);
    });
    
    //当监管平台开关打开时判定上传字段
	var isUpPlatformInfo = "${isUpPlatformInfo?string('true','flase')}";
	
	
	$("#submit_button").click(function(){
	
		var spCodesTemp = "";
    	var driverJobType = "";
    	$('input:checkbox[name=JobType]:checked').each(function(i){
    	       if(0==i){
    	        spCodesTemp = $(this).val();
    	       }else{
    	        spCodesTemp += (","+$(this).val());
    	       }
    	});
    	$("input[name=driverJobType]:checked").each(function(i){
    		if(0==i){
    				driverJobType = $(this).val();
    	       }else{
    	    	   driverJobType += (","+$(this).val());
    	       }
    	});
    	$("#detailedJobType").val(spCodesTemp);
	
	
		//公共验证
		var feifaPattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？]");
		var username = $("#username").val().trim();
		if(username == "" || username == null){
       	 	 $.scojs_message("工号不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }else{
        	if(feifaPattern.test(username)){
			$.scojs_message("工号不能含有非法字符", $.scojs_message.TYPE_ERROR);
			return false;
			}
        }
		var name = $("#name").val().trim();
		if(name == "" || name == null){
       	 	 $.scojs_message("昵称不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }else{
        	if(feifaPattern.test(name)){
			$.scojs_message("昵称不能含有非法字符", $.scojs_message.TYPE_ERROR);
			return false;
			}
        }
        var realname = $("#realname").val().trim();
		if(realname == "" || realname == null){
       	 	 $.scojs_message("真实姓名不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }/*else{
        	if(feifaPattern.test(realname)){
			$.scojs_message("真实姓名不能含有非法字符", $.scojs_message.TYPE_ERROR);
			return false;
			}else{
				var reg=new RegExp("[\\u4E00-\\u9FFF]+","g");//汉字
				if(reg.test(realname)){
					//漢字
					if(realname.length>4){
						$.scojs_message("真实姓名长度最多为4个汉字", $.scojs_message.TYPE_ERROR);
						return false;
					}
				}else{
					if(realname.length>8){
						$.scojs_message("真实姓名使用非汉字最多8个字符", $.scojs_message.TYPE_ERROR);
						return false;
					}
				}
			}
        }*/
		var idCard = $("#idCard").val().trim();
		if(idCard == "" || idCard == null){
       	 	 $.scojs_message("身份证号不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
        if(idCard.length<8){
    		$.scojs_message("身份证至少填写8位", $.scojs_message.TYPE_ERROR);
    		return false;
    	}
    	var bankCard = $("#bankCard").val().trim();
		if(bankCard == "" || bankCard == null){
       	 	 $.scojs_message("支付账号不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
		var phone = $("#phone").val().trim();
		if(phone == "" || phone == null){
       	 	 $.scojs_message("手机号不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
        var isphone=/^[0-9]{1,15}$/; 
		if (!isphone.test(phone)){
			$.scojs_message("手机号格式不正确", $.scojs_message.TYPE_ERROR);
			return false;
		}
		var emergency = $("#emergency").val().trim();
		if(emergency == "" || emergency == null){
       	 	 $.scojs_message("紧急联系人不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
		var licenseTime = $("#licenseTime").val().trim();
		if(licenseTime == "" || licenseTime == null){
       	 	 $.scojs_message("领证时间不能为空", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
        var zhuanchestart = $("input[name='driverJobType']:checked")
        if(zhuanchestart.length == 0){
       	 	 $.scojs_message("至少选择一种服务类型", $.scojs_message.TYPE_ERROR);
       	 	 return false;
        }
        //js中断标识
        var brokenFlag = true;
        
        //是否选择跑腿业务
        zhuanchestart.each(function(index,element){
        	var elementVal = $(element).val();
	    	if("paotui" == elementVal){
	    		var paotuiCld = $("input[name='JobType']:checked")
	    		if(paotuiCld.length == 0){
	    			 $.scojs_message("至少选择一种跑腿子类型", $.scojs_message.TYPE_ERROR);
       	 	 		 brokenFlag = false;
	       	 	 	 retrun;
	    		}
	    	}
        });
        //是否选择专车业务
		zhuanchestart.each(function(index,element){
			var elementVal = $(element).val();
	    	if("zhuanche" == elementVal){
	    		if("true" == isUpPlatformInfo){
		    		//上传验证
		    		//服务人员头像是否为空
		           var show_photo =  $("#show_photo")[0].src;
		           var flag = show_photo.indexOf("noImg.png");
		    	  if(CheckImgExists(show_photo)){
		    	 		if(flag != -1){
			           		$.scojs_message("上传监管平台开关已开启，请上传服务人员头像", $.scojs_message.TYPE_ERROR);
			            	brokenFlag = false;
	       	 	 			retrun;
		            	}
		    	 	}else{
		    	 		$.scojs_message("上传监管平台开关已开启，请上传服务人员头像", $.scojs_message.TYPE_ERROR);
		        		brokenFlag = false;
	       	 	 		retrun;
		    	 	}
		           	 //服务人员驾驶证图片是否为空
		          	var show_license =  $("#show_license")[0].src;
		          	var flag = show_photo.indexOf("noImg.png");
		    	 	if(CheckImgExists(show_license)){
		    	 		if(flag != -1){
			           		$.scojs_message("上传监管平台开关已开启，请上传服务人员驾驶证图片", $.scojs_message.TYPE_ERROR);
			            	brokenFlag = false;
		       	 	 		retrun;
		            	}
		    	 	}else{
		    	 		$.scojs_message("上传监管平台开关已开启，请上传服务人员驾驶证图片", $.scojs_message.TYPE_ERROR);
		        		brokenFlag = false;
	       	 	 		retrun;
		    	 	}
		           	 
		    		 var driveTimes = $("#driveTimes").val().trim();
				     if (driveTimes == "" || driveTimes == null) {
		                 $.scojs_message("上传监管平台开关已开启，服务次数不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		    		 var starLevel = $("#starLevel").val().trim();
				     if (starLevel == "" || starLevel == null) {
		                 $.scojs_message("上传监管平台开关已开启，服务人员评分不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		           	 var licenseType = $("#licenseType").val().trim();
				     if (licenseType == "" || licenseType == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾照类型不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		    		 var introducer = $("#introducer").val().trim();
				     if (introducer == "" || introducer == null) {
		                 $.scojs_message("上传监管平台开关已开启，介绍人不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		    		 var height = $("#height").val().trim();
				     if (height == "" || height == null) {
		                 $.scojs_message("上传监管平台开关已开启，服务人员身高不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		           	 var driverCensus = $("#driverCensus").val().trim();
					 if(driverCensus == "" || driverCensus == null){
			       	 	 $.scojs_message("上传监管平台开关已开启，户口登记机关不能为空", $.scojs_message.TYPE_ERROR);
			       	 	 brokenFlag = false;
	       	 	 		 retrun;
			         }else{
			        	if(driverCensus.length > 35){
				       	 	 $.scojs_message("户口登记机关，长度超过35个字符", $.scojs_message.TYPE_ERROR);
				       	 	 brokenFlag = false;
	       	 	 		 	 retrun;
			        	}
			         }
		    		 var origin = $("#origin").val().trim();
				     if (origin == "" || origin == null) {
		                 $.scojs_message("上传监管平台开关已开启，服务人员籍贯不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		    		 var address = $("#address").val().trim();
				     if (address == "" || address == null) {
		                 $.scojs_message("上传监管平台开关已开启，服务人员家庭住址不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
	       	 	 		 retrun;
		           	 }
		    		 var pressingName = $("#pressingName").val().trim();
				     if (pressingName == "" || pressingName == null) {
		                 $.scojs_message("上传监管平台开关已开启，紧急联系人不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var pressingPhone = $("#pressingPhone").val().trim();
				     if (pressingPhone == "" || pressingPhone == null) {
		                 $.scojs_message("上传监管平台开关已开启，紧急电话不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var pressingPhone = $("#pressingPhone").val().trim();
				     if (pressingPhone == "" || pressingPhone == null) {
		                 $.scojs_message("上传监管平台开关已开启，紧急电话不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var addressCode = $("#addressCode").val().trim();
				     if (addressCode == "" || addressCode == null) {
		                 $.scojs_message("上传监管平台开关已开启，平台的注册地行政区划代码不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }else{
		           	 	if(addressCode.substring(2,4) == "00" && addressCode != "710000"  && addressCode != "810000"  && addressCode != "820000"){
		           	 		 $.scojs_message("上传监管平台开关已开启，省请选择市级（除台湾省），直辖市请选择下辖区", $.scojs_message.TYPE_ERROR);
		           	 		 brokenFlag = false;
		           	 		 retrun;
		           	 	}
		           	 }
		    		 var carNumber = $("#carNumber").val().trim();
				     if (carNumber == "" || carNumber == null) {
		                 $.scojs_message("上传监管平台开关已开启，车辆车牌不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var driverLicenseNo = $("#driverLicenseNo").val().trim();
				     if (driverLicenseNo == "" || driverLicenseNo == null) {
		                 $.scojs_message("上传监管平台开关已开启，机动车驾驶证号不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var driverLicenseId = $("#driverLicenseId").val().trim();
				     if (driverLicenseId == "" || driverLicenseId == null) {
		                 $.scojs_message("上传监管平台开关已开启，机动车驾档编号不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var nationality = $("#nationality").val().trim();
				     if (nationality == "" || nationality == null) {
		                 $.scojs_message("上传监管平台开关已开启，国籍不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var nation = $("#nation").val().trim();
				     if (nation == "" || nation == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员民族不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var birthday = $("#birthday").val().trim();
				     if (birthday == "" || birthday == null) {
		                 $.scojs_message("上传监管平台开关已开启，出生日期不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var marital = $("#marital").val().trim();
				     if (marital == "" || marital == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员婚姻状况不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var education = $("#education").val().trim();
				     if (education == "" || education == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员学历不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var foreignLanguageAbility = $("#foreignLanguageAbility").val().trim();
				     if (foreignLanguageAbility == "" || foreignLanguageAbility == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员外语能力不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var concatAddress = $("#concatAddress").val().trim();
				     if (concatAddress == "" || concatAddress == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员驾驶员通信地址不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var trafficViolation = $("#trafficViolation").val().trim();
				     if (trafficViolation == "" || trafficViolation == null) {
		                 $.scojs_message("上传监管平台开关已开启，交通违章次数不能为空", $.scojs_message.TYPE_ERROR);
		                brokenFlag = false;
		                retrun;
		           	 }
		    		 var driverLicenseValid = $("#driverLicenseValid").val().trim();
				     if (driverLicenseValid == "" || driverLicenseValid == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶证有效期起始时间不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var driverLicenseInvalid = $("#driverLicenseInvalid").val().trim();
				     if (driverLicenseInvalid == "" || driverLicenseInvalid == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶证有效期限结束时间不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseNo = $("#taxiLicenseNo").val().trim();
				     if (taxiLicenseNo == "" || taxiLicenseNo == null) {
		                 $.scojs_message("上传监管平台开关已开启，网络预约出租车驾驶员证编号不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseOrg = $("#taxiLicenseOrg").val().trim();
				     if (taxiLicenseOrg == "" || taxiLicenseOrg == null) {
		                 $.scojs_message("上传监管平台开关已开启，资格证发证机构不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseRegister = $("#taxiLicenseRegister").val().trim();
				     if (taxiLicenseRegister == "" || taxiLicenseRegister == null) {
		                 $.scojs_message("上传监管平台开关已开启，资格证发证日期不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseRecive = $("#taxiLicenseRecive").val().trim();
				     if (taxiLicenseRecive == "" || taxiLicenseRecive == null) {
		                 $.scojs_message("上传监管平台开关已开启，初次领取资格证日期不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseValid = $("#taxiLicenseValid").val().trim();
				     if (taxiLicenseValid == "" || taxiLicenseValid == null) {
		                 $.scojs_message("上传监管平台开关已开启，资格证有效起始日期不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var taxiLicenseInvalid = $("#taxiLicenseInvalid").val().trim();
				     if (taxiLicenseInvalid == "" || taxiLicenseInvalid == null) {
		                 $.scojs_message("上传监管平台开关已开启，资格证有效截止日期不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var contractCompany = $("#contractCompany").val().trim();
				     if (contractCompany == "" || contractCompany == null) {
		                 $.scojs_message("上传监管平台开关已开启，合同（或协议）签署公司不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var contractValid = $("#contractValid").val().trim();
				     if (contractValid == "" || contractValid == null) {
		                 $.scojs_message("上传监管平台开关已开启，合同有效期起始时间不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var contractInvalid = $("#contractInvalid").val().trim();
				     if (contractInvalid == "" || contractInvalid == null) {
		                 $.scojs_message("上传监管平台开关已开启，合同有效期结束时间不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var cruise = $("#cruise").val().trim();
				     if (cruise == "" || cruise == null) {
		                 $.scojs_message("上传监管平台开关已开启，请选择是否巡游出租汽车驾驶员", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var inBlacklist = $("#inBlacklist").val().trim();
				     if (inBlacklist == "" || inBlacklist == null) {
		                 $.scojs_message("上传监管平台开关已开启，请选择是否在黑名单内", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var phoneOperator = $("#phoneOperator").val().trim();
				     if (phoneOperator == "" || phoneOperator == null) {
		                 $.scojs_message("上传监管平台开关已开启，请选择服务人员运营商", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var mapType = $("#mapType").val().trim();
				     if (mapType == "" || mapType == null) {
		                 $.scojs_message("上传监管平台开关已开启，请选择使用地图类型", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var commercialType = $("#commercialType").val().trim();
				     if (commercialType == "" || commercialType == null) {
		                 $.scojs_message("上传监管平台开关已开启，请选择服务类型", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var emergencyAddress = $("#emergencyAddress").val().trim();
				     if (emergencyAddress == "" || emergencyAddress == null) {
		                 $.scojs_message("上传监管平台开关已开启，紧急情况联系人通信地址不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
		    		 var seviceReview = $("#seviceReview").val().trim();
				     if (seviceReview == "" || seviceReview == null) {
		                 $.scojs_message("上传监管平台开关已开启，驾驶员服务质量信誉考核结果不能为空", $.scojs_message.TYPE_ERROR);
		                 brokenFlag = false;
		                 retrun;
		           	 }
	    		}
	    	}	
     	});		
	 	
	 	if(brokenFlag){
	 	
	 		var addressCodeIdsArr=[];
	 		$(".addressCode_class").each(function(index,element){
            	if($(element).val()!=""){
            		addressCodeIdsArr.push($(element).val());
            	}
            	$("#addressCodeArr").val(addressCodeIdsArr.join(","));
            });
	 	
	 		//验证通过
	        $.post(ctx+"/driver/create",$("#submit_form").serialize(),
		    function(data){
		        if(data.success){
		            $.scojs_message("添加成功", $.scojs_message.TYPE_OK);
		            setTimeout(function(){
		            window.location.href=ctx+"/driver/list";
		            }, 800);
		        }else{
		            $.scojs_message(data.message, $.scojs_message.TYPE_ERROR);
		        }
		    },'json'); 
	 	}
	
	});
	cityopts = null;
	districtData = null;
	nationopts = null;
	nationData = null;
	educationopts = null;
	educationData = null;
	licenseTypeopts = null;
	driverTypeData = null;
});
	
function CheckImgExists(imgurl) {  
	var ImgObj = new Image(); //判断图片是否存在  
	ImgObj.src = imgurl;  
	//没有图片，则返回-1  
	if (ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {  
   	 	return true;  
	} else {  
   	 	return false;
 	}  
} 

	


</script>
</@override>
<@extends name="../layout.ftl"/>
